package com.itheima.controller;

import com.itheima.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ConsumerController {
    @Autowired
    private ProjectService projectService;
    @GetMapping(value = "/consumer/{name}")
    public String getService(@PathVariable("name") String name) {
        String project = projectService.findProject(name);
        System.out.println(project);
        return project;
    }
}